package main
import(
	"fmt"
)

func main(){
  //方式1
  var a map[int]string
  //只声明，没有内存空间，需要make初始化
  a = make(map[int]string,10)
  //赋值
  a[20090291] = "eric"
  a[20090289] = "gwq"
  a[20090267] = "Gg"
  a[20090267] = "Mm"//key唯一，重复取后面
  a[20090287] = "Mm"//value可以重复的
  fmt.Println(a)
  //方式2
  b := make(map[int]string)
  b[20090291] = "eric"
  b[20090289] = "gwq"
  fmt.Println(b)
  //方式3
  c := map[int]string{
    20090291 : "eric",
    20090292 : "gwq",
  }
  c[20090267] = "Gg"
  fmt.Println(c)

  
}
